Copy Generic Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Copies count items from the list source, starting at the index sourceIndex, to the list dest, starting at the index destIndex. If necessary, the size of the destination list is expanded. The source and destination lists may be the same.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public static void Copy<T>(
	IList<T> source,
	int sourceIndex,
	IList<T> dest,
	int destIndex,
	int count
)
Visual Basic (Declaration)
Public Shared Sub Copy(Of T) ( _
	source As IList(Of T), _
	sourceIndex As Integer, _
	dest As IList(Of T), _
	destIndex As Integer, _
	count As Integer _
)
Visual C++
public:
generic<typename T>
static void Copy (
	IList<T>^ source, 
	int sourceIndex, 
	IList<T>^ dest, 
	int destIndex, 
	int count
)

Parameters

source
IList<(Of <T>)>
The collection that provide the source items.
sourceIndex
Int32
The index within sourceto begin copying items from.
dest
IList<(Of <T>)>
The list to store the items into.
destIndex
Int32
The index within destto begin copying items to.
count
Int32
The maximum number of items to copy.

Type Parameters

T

Exceptions

ExceptionCondition
System..::ArgumentOutOfRangeExceptionsourceIndex is negative or greater than source.Count
System..::ArgumentOutOfRangeExceptiondestIndex is negative or greater than dest.Count
System..::ArgumentOutOfRangeExceptioncount is negative or too large.
System..::ArgumentNullExceptionsource or dest is null.

See Also